4D Chart v13

Referring to 4D Chart Objects

Home

 
4D Chart v13
Referring to 4D Chart Objects

Referring to 4D Chart Objects  


 

 

A 4D Chart document is composed of different objects such as graphs, axis labels, entered text, pictures, etc. 4D Chart enables you to handle those objects programmatically.

This section describes how to do the following programmatically:

  • Refer to objects,
  • Specify the coordinates of an object,
  • Specify the scope of a command.

Every object in a 4D Chart document is given a unique number. This number is referred to as the object’s ID and is assigned when the object is created.

This means that each time the user creates a graph, draws an object with the Tools palette, pastes an object from the Clipboard, groups several objects, duplicates an existing object, or pastes a field reference, a new ID is assigned. Since the object ID is unique, IDs are a convenient way to refer to objects. Object IDs are never reused within a document. Even if an object is deleted, its number is “retired” for the life of the document.

Object IDs are not transferable. An object whose ID is equal to 5 in one 4D Chart document will not necessarily have the same ID if it is pasted into another document.

All of the standard object creation commands are functions and return the resulting object’s ID. Unlike objects created by the user through the palette, objects created through the commands are not automatically selected.

You can obtain the ID of an object using the CT Get ID function.

An object’s position and size are referred to as its coordinates. All commands that describe or specify coordinates do so in points.

Commands that describe or specify a position do so with respect to the origin. The origin is the intersection of the zero points on the horizontal and vertical rulers. The following diagram illustrates the coordinate system.

Many 4D Chart commands have a parameter called scope, which specifies which objects or text characters in a 4D Chart document are affected by the command.

The following table describes the general rules for scope. For a description of how scope affects a given command, see the description of that command.

ScopeAffected text or object
>0Object ID
0Selected objects
-1All objects in the document
-2Default values
-3Selected characters in a text object

 
PROPERTIES 

Product: 4D Chart
Theme: Introduction to the language